package cn.wolfcode.mapper;

import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.QueryObject;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;
@Repository
public interface EmployeeMapper {
    int delete(Long id);

    int insert(Employee record);

    Employee selectForId(Long id);

    List<Employee> selectList();

    int update(Employee emp);

    List<Employee> selectForList(QueryObject qo);

    void deleteRelation(@Param("employeeId") Long employeeId);

    void insertRelation(@Param("employeeId") Long employeeId, @Param("roleId") Long roleId);

    Employee selectByUsername(String username);

    Employee selectByUsernameAndPassword(@Param("username") String username, @Param("password") String password);

}